<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Test1214 extends Model
{
    /**
     * 连接数据表
     * @var string
     */
    protected $table = "test1214s";

    /**
     * 添加数据
     * @param $data
     * @return mixed
     */
    public static function addOne($data){
        return self::insert($data);
    }

    /**
     * 获取一条数据
     * @param $where
     * @return mixed
     */
    public static function getOne($where){
        return self::where($where)->first();
    }

    /**
     * 修改数据
     * @param $where
     * @param $data
     * @return mixed
     */
    public static function upOne($where,$data){
        return self::where($where)->update($data);
    }
}
